<h1>Home#index</h1>
<%if @user ==-1%>
<%else%>
<%if @user.studentId=='50902219'%>
<%= link_to 'quan ly user', users_path %>
</br>
<%= link_to 'quan ly sach', booktables_path %>
</br>
<%= link_to 'quan ly muon sach', booktables_path %>
<%end%>
<%end%>
<table>
  <tr>
    <th>Namebook</th>
    <th>Nameauthor</th>
    <th>TypeBook</th>
    <th>Quantity</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @booktables.each do |booktable| %>
  <tr>
    <td><%= booktable.nameBook %></td>
    <td><%= booktable.nameAuthor %></td>
    <td><%= booktable.typeBook %></td>
    <td><%= booktable.quantity %></td>
    <td><%= link_to 'Show', booktable %></td>
    <td><%= link_to 'Edit', edit_booktable_path(booktable) %></td>
    <td><%= link_to 'Destroy', booktable, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />